package blt.app_core.api.purse;

import blt.app_core.api.base.bean.OAuth;
import blt.app_core.api.base.bean.State;
import blt.app_core.api.journey.bean.AppealInfo;
import blt.app_core.api.purse.bean.ChargeVo;
import blt.app_core.api.purse.bean.CouponVo;
import blt.app_core.api.purse.bean.PayVo;
import blt.app_core.api.purse.bean.PurseVo;
import blt.app_core.api.purse.bean.VoucherVo;
import blt.app_core.utils.UriProdiver;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

/**
 * Created by xgp on 2017/6/21.
 */

public interface PayService {
    @GET(UriProdiver.GET_PURSE_INFO)
    Call<State<PurseVo>> getPurseInfo();

    /**
     * 获取钱包数据
     *
     * @return
     */
    @GET(UriProdiver.GET_VOUCHER_LIST)
    Call<OAuth<ChargeVo>> getVoucherList();

    /**
     * @param payChannel 平台：微信，支付宝
     * @param amt        充值金额
     * @param remark     备注
     * @return
     */
    @POST(UriProdiver.CREATE_ORDER)
    @FormUrlEncoded
    Call<State<PayVo>> createOrder(@Field("payChannel") String payChannel,
                                   @Field("amt") int amt, @Field("remark") String remark);

    
    @POST(UriProdiver.CREATE_ORDER_FOR_TEST)
    @FormUrlEncoded
    Call<State> createTestOrder(@Field("payChannel") String payChannel,
                                @Field("amt") int amt, @Field("remark") String remark);

    /**
     * 获取充值明细列表
     *
     * @return
     */
    @GET(UriProdiver.GET_VOUCHVER)
    Call<OAuth<VoucherVo>> getChargeDetail();

    @POST(UriProdiver.GET_COUPON_LIST)
    @FormUrlEncoded
    Call<OAuth<CouponVo>> getCouponList(@Field("pageNum") int page, @Field("pageSize") int pageSize);

    @POST(UriProdiver.CONVERT_TICK)
    @FormUrlEncoded
    Call<State> convertTick(@Field("couponTicket") String couponTicket);


    /**
     * 红包提现
     */
    @GET(UriProdiver.GET_RED_INFO)
    Call<OAuth<AppealInfo>> getRedInfo();

    @POST(UriProdiver.EXTRACT_MONEY)
    @FormUrlEncoded
    Call<State> extractMoney(@Field("withDrawAmt") String withDrawAmt);

}
